package com.yunhe.policyfulfillment.authority.service;

import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.model.mybatis.PageResult;
import com.yunhe.policyfulfillment.authority.domain.PolicyUser;
import com.yunhe.policyfulfillment.authority.model.DisableRecoveryUser;
import com.yunhe.policyfulfillment.authority.model.PolicyUserChangePassword;
import com.yunhe.policyfulfillment.authority.model.PolicyUserQueryCondition;
import com.yunhe.policyfulfillment.authority.model.UserLogin;

import java.util.List;

/**
 * @ClassName UserService
 * @Description TODO
 * @Author HeTao
 * @Date 2021/7/21 17:54
 * @Version 1.0
 **/
public interface IPolicyUserService {

    /**
     * 删除
     */
    public void deletePolicyUser(List<Long> ids);

    /**
     * 登录
     * @param userLogin
     * @return
     */
    PolicyUser backPolicyUserlLogin(UserLogin userLogin);

    /**
     * 查询所有用户
     * @return
     */
    List<PolicyUser> findPolicyUsers();

    /**
     * 通过部门查询部门所在的人员
     * @param currentAuditOrg
     * @return
     */
    List<PolicyUser> findPolicyUsersByOrgId(int currentAuditOrg);

    PolicyUser findPolicyUserById(long approvePerson);

    void createPolicyUser(PolicyUser policyUser) throws ArgumentErrorException;

    void updatePolicyUser(PolicyUser policyUser) throws ArgumentErrorException;

    PageResult findPolicyUserByCondition(PolicyUserQueryCondition policyUserQueryCondition);

    String resetPassword(List<Long> ids) throws ArgumentErrorException;

    void disableRecoveryUser(DisableRecoveryUser disableRecoveryUser) throws ArgumentErrorException;

    void updatePassword(PolicyUserChangePassword policyUserChangePassword) throws ArgumentErrorException;

    /**
     * 通过角色id查询人员
     * @param roleId 角色id
     * @return List<PolicyUser>
     */
    List<PolicyUser> findPolicyUsersByRoleId(Long roleId);

    /**
     * 解绑角色
     * @param id 用户id
     */
    void unbindRole(Long id);
}
